
import i18n from "@/lang";

export const ROLE_DATA_STATISTICS = 'dataStatistics';//数据统计

export const ROLE_PACKAGE_MANAGEMENT = 'packageManagement';//小包管理

export const ROLE_INVENTORY_MANAGEMENT = 'inventoryManagement';//库存管理

export const ROLE_ACCOUNT_MANAGEMENT = 'accountManagement';//账号管理

export const ROLE_CARGO_MANAGEMENT = 'cargoManagement';//货件管理

export const ROLE_WORKORDER_MANAGEMENT = 'workOrderManagement';//工单管理

export const ROLE_OPERATE = 'supervise';

export const ROLE_FINANCE = 'commissioner';

export function getRoleName(role){
  switch (role){
    case ROLE_DATA_STATISTICS:
      return '数据统计'
    case ROLE_PACKAGE_MANAGEMENT:
      return '小包管理'
    case ROLE_INVENTORY_MANAGEMENT:
      return '库存管理'
    case ROLE_ACCOUNT_MANAGEMENT:
      return '账号管理'
    case  ROLE_CARGO_MANAGEMENT:
      return '货件管理'
    case  ROLE_WORKORDER_MANAGEMENT:
      return '工单管理'
    default:
      return role
  }
}


export function getRoleTypeName(roleType){
  switch (roleType){
    case ROLE_FINANCE:
      return i18n.t('childList.专员')
    case ROLE_OPERATE:
      return i18n.t('childList.主管')
  }
}
